package com.petmarket.common;

import org.fisco.bcos.sdk.v3.codec.datatypes.generated.tuples.generated.Tuple3;
import org.fisco.bcos.sdk.v3.codec.datatypes.generated.tuples.generated.Tuple4;

import java.math.BigInteger;
import java.util.ArrayList;
import java.util.List;

public class TupleConverter {
    public static Tuple4<BigInteger,String,String,String> tuple3ConvertTuple4(Tuple3<String,String,String> tuple3,BigInteger id){
        List<String> list = new ArrayList<>();
        list.add(tuple3.getValue1());
        list.add(tuple3.getValue2());
        list.add(tuple3.getValue3());
        return new Tuple4<BigInteger,String,String,String>(
                (BigInteger) id,
                (String) list.get(0),
                (String) list.get(1),
                (String) list.get(2)
        );
    }
}
